circuit Arbiter_10 :
  module Arbiter_10 : 
    input clock : Clock
    input reset : UInt<1>
    output io : {flip in : {flip ready : UInt<1>, valid : UInt<1>, bits : {req : {idx : UInt<6>, way_en : UInt<4>, tag : UInt<20>}[1]}}[6], out : {flip ready : UInt<1>, valid : UInt<1>, bits : {req : {idx : UInt<6>, way_en : UInt<4>, tag : UInt<20>}[1]}}, chosen : UInt<3>}
    
    io.chosen <= UInt<3>("h05") @[Arbiter.scala 123:13]
    io.out.bits.req[0].tag <= io.in[5].bits.req[0].tag @[Arbiter.scala 124:15]
    io.out.bits.req[0].way_en <= io.in[5].bits.req[0].way_en @[Arbiter.scala 124:15]
    io.out.bits.req[0].idx <= io.in[5].bits.req[0].idx @[Arbiter.scala 124:15]
    when io.in[4].valid : @[Arbiter.scala 126:27]
      io.chosen <= UInt<3>("h04") @[Arbiter.scala 127:17]
      io.out.bits.req[0].tag <= io.in[4].bits.req[0].tag @[Arbiter.scala 128:19]
      io.out.bits.req[0].way_en <= io.in[4].bits.req[0].way_en @[Arbiter.scala 128:19]
      io.out.bits.req[0].idx <= io.in[4].bits.req[0].idx @[Arbiter.scala 128:19]
      skip @[Arbiter.scala 126:27]
    when io.in[3].valid : @[Arbiter.scala 126:27]
      io.chosen <= UInt<2>("h03") @[Arbiter.scala 127:17]
      io.out.bits.req[0].tag <= io.in[3].bits.req[0].tag @[Arbiter.scala 128:19]
      io.out.bits.req[0].way_en <= io.in[3].bits.req[0].way_en @[Arbiter.scala 128:19]
      io.out.bits.req[0].idx <= io.in[3].bits.req[0].idx @[Arbiter.scala 128:19]
      skip @[Arbiter.scala 126:27]
    when io.in[2].valid : @[Arbiter.scala 126:27]
      io.chosen <= UInt<2>("h02") @[Arbiter.scala 127:17]
      io.out.bits.req[0].tag <= io.in[2].bits.req[0].tag @[Arbiter.scala 128:19]
      io.out.bits.req[0].way_en <= io.in[2].bits.req[0].way_en @[Arbiter.scala 128:19]
      io.out.bits.req[0].idx <= io.in[2].bits.req[0].idx @[Arbiter.scala 128:19]
      skip @[Arbiter.scala 126:27]
    when io.in[1].valid : @[Arbiter.scala 126:27]
      io.chosen <= UInt<1>("h01") @[Arbiter.scala 127:17]
      io.out.bits.req[0].tag <= io.in[1].bits.req[0].tag @[Arbiter.scala 128:19]
      io.out.bits.req[0].way_en <= io.in[1].bits.req[0].way_en @[Arbiter.scala 128:19]
      io.out.bits.req[0].idx <= io.in[1].bits.req[0].idx @[Arbiter.scala 128:19]
      skip @[Arbiter.scala 126:27]
    when io.in[0].valid : @[Arbiter.scala 126:27]
      io.chosen <= UInt<1>("h00") @[Arbiter.scala 127:17]
      io.out.bits.req[0].tag <= io.in[0].bits.req[0].tag @[Arbiter.scala 128:19]
      io.out.bits.req[0].way_en <= io.in[0].bits.req[0].way_en @[Arbiter.scala 128:19]
      io.out.bits.req[0].idx <= io.in[0].bits.req[0].idx @[Arbiter.scala 128:19]
      skip @[Arbiter.scala 126:27]
    node _T = or(io.in[0].valid, io.in[1].valid) @[Arbiter.scala 31:68]
    node _T_1 = or(_T, io.in[2].valid) @[Arbiter.scala 31:68]
    node _T_2 = or(_T_1, io.in[3].valid) @[Arbiter.scala 31:68]
    node _T_3 = or(_T_2, io.in[4].valid) @[Arbiter.scala 31:68]
    node grant_1 = eq(io.in[0].valid, UInt<1>("h00")) @[Arbiter.scala 31:78]
    node grant_2 = eq(_T, UInt<1>("h00")) @[Arbiter.scala 31:78]
    node grant_3 = eq(_T_1, UInt<1>("h00")) @[Arbiter.scala 31:78]
    node grant_4 = eq(_T_2, UInt<1>("h00")) @[Arbiter.scala 31:78]
    node grant_5 = eq(_T_3, UInt<1>("h00")) @[Arbiter.scala 31:78]
    node _T_4 = and(UInt<1>("h01"), io.out.ready) @[Arbiter.scala 134:19]
    io.in[0].ready <= _T_4 @[Arbiter.scala 134:14]
    node _T_5 = and(grant_1, io.out.ready) @[Arbiter.scala 134:19]
    io.in[1].ready <= _T_5 @[Arbiter.scala 134:14]
    node _T_6 = and(grant_2, io.out.ready) @[Arbiter.scala 134:19]
    io.in[2].ready <= _T_6 @[Arbiter.scala 134:14]
    node _T_7 = and(grant_3, io.out.ready) @[Arbiter.scala 134:19]
    io.in[3].ready <= _T_7 @[Arbiter.scala 134:14]
    node _T_8 = and(grant_4, io.out.ready) @[Arbiter.scala 134:19]
    io.in[4].ready <= _T_8 @[Arbiter.scala 134:14]
    node _T_9 = and(grant_5, io.out.ready) @[Arbiter.scala 134:19]
    io.in[5].ready <= _T_9 @[Arbiter.scala 134:14]
    node _T_10 = eq(grant_5, UInt<1>("h00")) @[Arbiter.scala 135:19]
    node _T_11 = or(_T_10, io.in[5].valid) @[Arbiter.scala 135:31]
    io.out.valid <= _T_11 @[Arbiter.scala 135:16]
